package pythonx

/*
#cgo CFLAGS: -I/usr/include/python3.13 -I/usr/include/x86_64-linux-gnu/python3.13
#cgo LDFLAGS: -L/usr/lib/x86_64-linux-gnu -lpython3.13
#cgo pkg-config: python3
#include <Python.h>
*/
import "C"
import (
	"fmt"
	"unsafe"
)

//cgo + Python C API

func RunPython() {

	C.Py_Initialize() // 初始化 Python 解释器
	defer C.Py_Finalize()

	code := C.CString(string(pythonFile))
	defer C.free(unsafe.Pointer(code))

	C.PyRun_SimpleString(code)
	fmt.Println("Python 执行完成")
}
